package com.lsj.gulimall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lsj.common.utils.PageUtils;
import com.lsj.gulimall.member.entity.MemberEntity;
import com.lsj.gulimall.member.execption.PhoneExistException;
import com.lsj.gulimall.member.execption.UserNameExistException;
import com.lsj.gulimall.member.vo.GiteeSocialUser;
import com.lsj.gulimall.member.vo.MemberRegisterVo;
import com.lsj.gulimall.member.vo.UserLoginVo;

import java.util.Map;

/**
 * 会员
 *
 * @author lsj
 * @email 1326646663@qq.com
 * @date 2022-01-06 16:30:17
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void register(MemberRegisterVo vo);

    void checkPhoneUnique(String phone) throws PhoneExistException;
    void checkUserNameUnique(String userName) throws UserNameExistException;

    MemberEntity login(UserLoginVo vo);

    MemberEntity socialLogin(GiteeSocialUser socialUser) throws Exception;
}

